namespace OracleInternal.Json.Common
{
	internal class OracleJsonExceptions
	{
		internal static readonly IExceptionFactory ORACLE_FACTORY = new OracleExceptionFactory();

		internal static readonly OracleJsonExceptions IO = new OracleJsonExceptions("001");

		internal static readonly OracleJsonExceptions BAD_YEAR = new OracleJsonExceptions("002");

		internal static readonly OracleJsonExceptions NOT_IMPLEMENTED = new OracleJsonExceptions("004");

		internal static readonly OracleJsonExceptions CORRUPT = new OracleJsonExceptions("005");

		internal static readonly OracleJsonExceptions UNSUPPORTED_VERSION = new OracleJsonExceptions("006");

		internal static readonly OracleJsonExceptions LONG_KEY = new OracleJsonExceptions("007");

		internal static readonly OracleJsonExceptions IMAGE_TOO_BIG = new OracleJsonExceptions("008");

		internal static readonly OracleJsonExceptions CORRUPT2 = new OracleJsonExceptions("009");

		internal static readonly OracleJsonExceptions NO_DAYS_ALLOWED = new OracleJsonExceptions("010");

		internal static readonly OracleJsonExceptions BAD_WRAP = new OracleJsonExceptions("020");

		internal static readonly OracleJsonExceptions GENERATION_INCOMPLETE = new OracleJsonGenerationExceptions("011");

		internal static readonly OracleJsonExceptions MISSING_KEY = new OracleJsonGenerationExceptions("012");

		internal static readonly OracleJsonExceptions EXTRA_EVENTS = new OracleJsonGenerationExceptions("013");

		internal static readonly OracleJsonExceptions BAD_END = new OracleJsonGenerationExceptions("014");

		internal static readonly OracleJsonExceptions BAD_KEY = new OracleJsonGenerationExceptions("015");

		internal static readonly OracleJsonExceptions EXPECTED_VALUE = new OracleJsonGenerationExceptions("016");

		internal static readonly OracleJsonExceptions OVERFLOW = new OracleJsonIllegalStateExceptions("003");

		internal static readonly OracleJsonExceptions BAD_PARSER_STATE = new OracleJsonIllegalStateExceptions("017");

		internal static readonly OracleJsonExceptions BAD_PARSER_STATE3 = new OracleJsonIllegalStateExceptions("018");

		internal static readonly OracleJsonExceptions BAD_PARSER_STATE_VALUE = new OracleJsonIllegalStateExceptions("019");

		internal static readonly OracleJsonExceptions OBJ_NOT_MUTABLE = new OracleJsonUnsupportedExceptions("021");

		internal static readonly OracleJsonExceptions ARR_NOT_MUTABLE = new OracleJsonUnsupportedExceptions("022");

		protected string m_key;

		protected OracleJsonExceptions(string key)
		{
			m_key = key;
		}

		internal virtual RuntimeException Create(IExceptionFactory f, params object[] args)
		{
			return f.CreateJsonException(GetMessage(args));
		}

		internal string GetMessage(params object[] args)
		{
			return string.Format("JSON-" + m_key + " ", args);
		}
	}
}
